Scenario #3108: Invalidate Sepa Mandate for Debitor

Properties

Required

Given

name value
bankAccountIBAN DE02701500000000594937
mandateValidTo 2025-09-30

SEPA-Mandate: DE02701500000000594937

HTTP GET "/api/hs/office/sepamandates?iban=DE02701500000000594937" \
  -H "Authorization: Bearer $HSADMINNG_JWT_BEARER" \
  `# {` \
  `#   "sub" : "uuid<hsh-alex_superuser>"` \
  `# }`
=> status: 200 OK 
[ {
  "uuid" : "857120fb-ece9-41fb-9cc1-bf2f9a4f83e4", // SEPA-Mandate: Test AG
  "debitor" : {
    "uuid" : "87bc5864-52cd-4738-94f4-a986db8c7674", // Debitor: D-3101000 - Test AG - main debitor
    "debitorRel" : {
      "uuid" : "23d90059-2e9b-4144-847c-42ca7b350580",
      "anchor" : {
        "uuid" : "3029ef4b-ab91-429d-855b-26a8bedcef6e", // Person: Test AG
        "personType" : "LEGAL_PERSON",
        "tradeName" : "Test AG",
        "salutation" : null,
        "title" : null,
        "givenName" : null,
        "familyName" : null
      },
      "holder" : {
        "uuid" : "3029ef4b-ab91-429d-855b-26a8bedcef6e", // Person: Test AG
        "personType" : "LEGAL_PERSON",
        "tradeName" : "Test AG",
        "salutation" : null,
        "title" : null,
        "givenName" : null,
        "familyName" : null
      },
      "type" : "DEBITOR",
      "mark" : null,
      "contact" : {
        "uuid" : "9e812bae-fd7b-45a1-9be4-e1265b41eeca",
        "caption" : "Test AG - billing department",
        "postalAddress" : { },
        "emailAddresses" : {
          "main" : "billing@test-ag.example.org"
        },
        "phoneNumbers" : { }
      }
    },
    "debitorNumber" : "D-3101000",
    "debitorNumberSuffix" : "00",
    "partner" : {
      "uuid" : "4db6b8bf-d1f9-4a92-953c-787e345acb22", // Partner: P-31010 - Test AG
      "partnerNumber" : "P-31010",
      "partnerRel" : {
        "uuid" : "da7c6690-455b-404c-aac3-fa98660e5a7d", // partnerRelationUuid
        "anchor" : {
          "uuid" : "8f6b2e83-5cd0-4f3b-bac9-c56b374445cf", // Person: Hostsharing eG
          "personType" : "LEGAL_PERSON",
          "tradeName" : "Hostsharing eG",
          "salutation" : null,
          "title" : null,
          "givenName" : null,
          "familyName" : null
        },
        "holder" : {
          "uuid" : "3029ef4b-ab91-429d-855b-26a8bedcef6e", // Person: Test AG
          "personType" : "LEGAL_PERSON",
          "tradeName" : "Test AG",
          "salutation" : null,
          "title" : null,
          "givenName" : null,
          "familyName" : null
        },
        "type" : "PARTNER",
        "mark" : null,
        "contact" : {
          "uuid" : "ab067924-4231-4dce-a465-f768d7d54c2a", // Contact: Test AG - China
          "caption" : "Test AG - China",
          "postalAddress" : {
            "country" : "China",
            "province" : "Guangdong Province",
            "city" : "Dongguan City",
            "street" : "No.2 Commercial Second Street",
            "district" : "Niushan Wei Wu",
            "department" : "Executive Board",
            "building" : "Thi Chi Koh Building"
          },
          "emailAddresses" : {
            "main" : "norden@test-ag.example.org"
          },
          "phoneNumbers" : {
            "phone" : "++15 999 654321"
          }
        }
      },
      "details" : {
        "uuid" : "bbb58ff5-d4bf-4d7f-b6a4-e40af4f0142f",
        "registrationOffice" : "Registergericht Hamburg",
        "registrationNumber" : "1234567",
        "birthName" : null,
        "birthPlace" : null,
        "birthday" : null,
        "dateOfDeath" : null
      }
    },
    "billable" : true,
    "vatId" : "VAT123456",
    "vatCountryCode" : "DE",
    "vatBusiness" : true,
    "vatReverseCharge" : false,
    "refundBankAccount" : {
      "uuid" : "59c0f2b0-f6eb-411f-bfee-2f49a0cb8836",
      "holder" : "Test AG - refund bank account",
      "iban" : "DE88100900001234567892",
      "bic" : "BEVODEBB"
    },
    "defaultPrefix" : "tst"
  },
  "bankAccount" : {
    "uuid" : "d76dcf06-ff66-41f4-8443-b70c88bfc623", // BankAccount: Test AG - debit bank account
    "holder" : "Test AG - debit bank account",
    "iban" : "DE02701500000000594937",
    "bic" : "SSKMDEMM"
  },
  "reference" : "Test AG - main debitor",
  "agreement" : "2022-10-12",
  "validFrom" : "2024-10-15",
  "validTo" : null
} ]

With production data, the bank-account could be used in multiple SEPA-mandates, make sure to use the right one!

Patch the End of the Mandate into the SEPA-Mandate

HTTP PATCH "/api/hs/office/sepamandates/857120fb-ece9-41fb-9cc1-bf2f9a4f83e4" // SEPA-Mandate: Test AG \
  -H "Authorization: Bearer $HSADMINNG_JWT_BEARER" \
  `# {` \
  `#   "sub" : "uuid<hsh-alex_superuser>"` \
  `# }` \
  <<EOF
{
  "validTo" : "2025-09-30"
}
EOF
=> status: 200 OK 

generated on 2026-08-10 03:08:30 for branch HEAD